// 频道请求相关
import request from '../utils/request.js'
// 频道列表
export const getAllchannels = function () {
  return request({
    method: 'get',
    url: '/v1_0/channels'
  })
}
// 批量覆盖频道列表
export const addUserChannel = function (channel) {
  return request({
    method: 'patch',
    url: '/v1_0/user/channels',
    data: {
      channels: [channel]
    }
  })
}
// 删除用户指定频道
export const deleteUserChannel = function (channelId) {
  return request({
    method: 'DELETE',
    url: '/v1_0/user/channels/' + channelId
  })
}
